<?php
namespace app\company\controller;
use think\Controller;
use think\Db;
use think\Session;
class Jl extends Controller
{
    public function index()
    {
        $company_id = Session::get('company_id');
        $res = Db::name('send s')
                ->join('position p','s.position_id = p.position_id')
                ->join('user u','s.user_id = u.user_id')
                ->where('company_id',$company_id)
                ->select();
        // dump($res);
        // exit;
        $this->assign("res",$res);
       return $this->fetch();
    }
    
    public function tojl($resume_id,$send_id)
    {
        $company_id = Session::get('company_id');
        $res = Db::name('resume')
                ->where('resume_id',$resume_id)
                ->select();
        // dump($res);
        // exit;
        $this->assign("res",$res);
        $data = [
            "send_too"=>1,
        ];
        Db::table('send')->where('send_id',$send_id)->update($data);
       return $this->fetch();
    }
}